import java.math.BigDecimal;
import java.util.Scanner;

public class 猴子吃包子 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        BigDecimal x = new BigDecimal(scanner.nextInt());
        BigDecimal y = new BigDecimal(scanner.nextInt());
        BigDecimal z = new BigDecimal(scanner.nextInt());

        BigDecimal x1 = new BigDecimal(scanner.nextInt());
        BigDecimal y1 = new BigDecimal(scanner.nextInt());
        BigDecimal z1 = new BigDecimal(scanner.nextInt());
        int n = scanner.nextInt();

        BigDecimal sum = x1.divide(x,n,BigDecimal.ROUND_HALF_UP).add(y1.divide(y,n,BigDecimal.ROUND_HALF_UP)).add(z1.divide(z,n,BigDecimal.ROUND_HALF_UP));
        System.out.println(sum);
    }
}
